import Vue from "vue";
import Router from "vue-router";
/* login */
/* layout */
import Layout from "@/views/layout/Layout";


const _import = require("./_import_" + process.env.NODE_ENV);

Vue.use(Router);

export const constantRouterMap = [{
	path: "/",
	component: Layout,
	children: [
		{
			path: '/',
			name: 'home',
			component: _import('Home')
		},
		{
			path: "answer",
			name: "answer",
			component: _import("Answer/index"),
		},
		{
			path: "returnVisit",
			name: "returnVisit",
			component: _import("ReturnVisit/index"),
		},
		{
			path: "followUp",
			name: "followUp",
			component: _import("FollowUp/index"),
		},
		{
			path: "problem",
			name: "problem",
			component: _import("Problem/index"),
		},
		{
			path: "setform",
			name: "setform",
			component: _import("Problem/setform"),
		},
		{
			path: "role",
			name: "role",
			component: _import("Role/index"),
		},
		{
			path: "personnel",
			name: "personnel",
			component: _import("Personnel/index"),
		}
	],
}];
const router = new Router({
	mode: "hash", // history 需要开启伪静态
	scrollBehavior: () => ({
		y: 0
	}),
	routes: constantRouterMap,
});
export default router;
